package ua.org.enginer.skins {
	
	import mx.core.EdgeMetrics;
	import mx.skins.Border;

	public class LinkButtonSkin extends Border {

		public function LinkButtonSkin() {
			super();
		}

		override public function get borderMetrics():EdgeMetrics {
			return EdgeMetrics.EMPTY;
		}

		override protected function updateDisplayList(w:Number, h:Number):void {
			super.updateDisplayList(w, h);

			var cornerRadius:Number = getStyle("cornerRadius");
			var color:uint = getStyle("skinColor");
			var rollOverColor:uint=color;
			var selectionColor:uint=rollOverColor;

			graphics.clear();

			switch(name) {
				case "upSkin": {
					// Draw invisible shape so we have a hit area.
					drawRoundRect(0, 0, w, h, cornerRadius, color, 0.5);
					break;
				}

				case "overSkin": {
					drawRoundRect(0, 0, w, h, cornerRadius, rollOverColor, .8);
					break;
				}

				case "downSkin": {
					drawRoundRect(0, 0, w, h, cornerRadius, selectionColor, .8);
					break;
				}

				case "disabledSkin": {
					// Draw invisible shape so we have a hit area.
					drawRoundRect(0, 0, w, h, cornerRadius, 0, 0);
					break;
				}
			}
		}
	}
}



